package com.reremouse.listener;

import com.reremouse.service.ImageService;
import com.reremouse.util.SpringHelper;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class BBSServletContextListener
        implements ServletContextListener {
    public void contextDestroyed(ServletContextEvent sce) {
    }

    public void contextInitialized(ServletContextEvent sce) {
        SpringHelper.buildSpringWebCtx(sce.getServletContext());

        ImageService iss = (ImageService) SpringHelper.getSpringBean("ImageService");
        iss.transferAllUserImages(sce.getServletContext());
    }
}

